/**
 * index.js
 * @author SoChishun
 * @version 1.0 <2015-3-23>
 * @since 1.0.0.0 <2015-3-23> SoChishun Added.
 */

// 表单验证 2015-3-23
$('#frm-login').validate({
    errorElement: "em",
    rules: {
        user_name: {required: true, minlength: 3, maxlength: 16},
        password: {required: true, minlength: 1, maxlength: 32}
    }
});

// 登录框样式 2015-3-23
$('#login-panel').dialog({'width': 330,
    'buttons': [
        {'text': '取回密码', 'click': function () {
            }},
        {'text': '登录', 'click': function () {
                return $('#frm-login').submit();
            }},
        {'text': '重置', 'click': function () {
                $('form')[0].reset();
            }}
    ]
});